package org.lboot.core.domain;


import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
@Schema(name = "分页查询数据对象", description = "分页查询数据对象")
public class PageParamDTO {

    @Schema(description = "页码(不能为空)", example = "1", defaultValue = "0", requiredMode = Schema.RequiredMode.REQUIRED)
    Integer pageNum = 0;


    @Schema(description = "每页数量(不能为空)", example = "10", defaultValue = "30",  requiredMode = Schema.RequiredMode.REQUIRED)
    Integer pageSize = 30;

    /**
     * 依据什么进行排序
     */
    @Schema(description = "排序参数", example = "id", defaultValue = "createdTime")
    String sortBy = "createdTime";

    /**
     * 排序规则 DESC/AES
     */
    @Schema(description = "排序规则", example = "DESC", defaultValue = "DESC", allowableValues = {"DESC", "AES"})
    String order = "DESC";
}
